package pe.edu.unmsm.fisi.ceups.modelo.entidad.id;

import pe.edu.unmsm.fisi.ceups.modelo.entidad.Chorario;

/**
 * ChorarioLaboratorioId entity.
 * 
 * @author MyEclipse Persistence Tools
 */

public class ChorarioLaboratorioId implements java.io.Serializable {

	// Fields

	private Chorario chorario;
	private Integer idhorariolaboratorio;

	// Constructors

	/** default constructor */
	public ChorarioLaboratorioId() {
	}

	/** full constructor */
	public ChorarioLaboratorioId(Chorario chorario, Integer idhorariolaboratorio) {
		this.chorario = chorario;
		this.idhorariolaboratorio = idhorariolaboratorio;
	}

	// Property accessors

	public Chorario getChorario() {
		return this.chorario;
	}

	public void setChorario(Chorario chorario) {
		this.chorario = chorario;
	}

	public Integer getIdhorariolaboratorio() {
		return this.idhorariolaboratorio;
	}

	public void setIdhorariolaboratorio(Integer idhorariolaboratorio) {
		this.idhorariolaboratorio = idhorariolaboratorio;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof ChorarioLaboratorioId))
			return false;
		ChorarioLaboratorioId castOther = (ChorarioLaboratorioId) other;

		return ((this.getChorario() == castOther.getChorario()) || (this
				.getChorario() != null
				&& castOther.getChorario() != null && this.getChorario()
				.equals(castOther.getChorario())))
				&& ((this.getIdhorariolaboratorio() == castOther
						.getIdhorariolaboratorio()) || (this
						.getIdhorariolaboratorio() != null
						&& castOther.getIdhorariolaboratorio() != null && this
						.getIdhorariolaboratorio().equals(
								castOther.getIdhorariolaboratorio())));
	}

	public int hashCode() {
		int result = 17;

		result = 37 * result
				+ (getChorario() == null ? 0 : this.getChorario().hashCode());
		result = 37
				* result
				+ (getIdhorariolaboratorio() == null ? 0 : this
						.getIdhorariolaboratorio().hashCode());
		return result;
	}

}